﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using SampleWebsite.Domain;

namespace SampleWebsite.Mappers
{
    public class CustomerMapper : DomainObjectMapper<Customer>, ICustomerMapper
    {
        /// <summary>
        /// Maps from field values.
        /// </summary>
        /// <param name="values">The values.</param>
        /// <returns></returns>
        protected override Customer MapFromFieldValues(object[] values)
        {
            return new Customer()
            {
                Id = 1,
                FirstName = "Frank",
                LastName = "Grimes",
                DateOfBirth = new DateTime(1978, 5, 10),
                WorkPhone = "(03) 5555 5555",
                HomePhone = "(03) 5555 7777",
                MobilePhone = "0444 555 555",
                Email = "frank.grimes@tempuri.org",
                HomeAddressStreet1 = "123 Sample St",
                HomeAddressStreet2 = "",
                HomeAddressCity = "Plainsville",
                HomeAddressState = "VIC",
                HomeAddressPostCode = "3555",
                HomeAddressCountry = "Australia"
            };
        }
    }
}
